The present invention relates to a method of accessing data in a computing device and, in particular to a method of accessing data held in a dynamic link library in the computing device. The present invention also relates to a computing device controlled by the method.
The term computing device as used herein is to be expansively construed to cover any form of electrical device and includes, data recording devices, such as digital still and movie cameras of any form factor, computers of any type or form, including hand held and personal computers, and communication devices of any form factor, including mobile phones, smart phones, communicators which combine communications, image recording and/or playback, and computing functionality within a single device, and other forms of wireless and wired information devices.
Most computing devices operate under the control of an operating system. The operating system can be regarded as the software that enables all the programs to be run on the computing device and can be key to greater operating efficiency and easier application development.
An operating system manages the hardware and software resources of the computing device. These resources include such things as the central processor unit (CPU), memory, and the disk space, if a disc forms part of or is used in conjunction with the computing device. As such, the operating system provides a stable, consistent way for applications running on the computing device to deal with the hardware resources of the computing device without the application needing to know all the details of the physical resources available to the hardware.
This task of managing the hardware and software resources is very important, because various programs and input methods compete for the attention of the CPU and demand memory, storage and input/output (I/O) resources for their own purposes. In this capacity, the operating system ensures that each application program is provided with the necessary resources, but always has due regard to the finite physical resources available to the device. An application program can be regarded as a complete, self-contained program that performs a specific function directly for the user of the device.
Another task that may be performed by the operating system is that of providing a consistent application program, or executable, interface (API). This is especially important if there is to be more than one of a particular type of computer using the operating system, or if the hardware making up the computer is ever open to change. This is particularly the case when the core operating system has several different users, such as can typically occur with computing devices in the form of wireless communications devices, such as smart phones.
With these devices it is not uncommon for various device manufacturers and device suppliers to adopt certain components of a core operating system as common components, but to tailor other components of the core operating system to their respective device requirements. It is pointed out that one distinction between an application program and the operating system is that applications run in ‘user mode’ (non-privileged mode), while operating systems and related utilities usually run in ‘supervisor mode’ (privileged mode). Hence, even in the smart phone example above, there are certain important components of the operating system, often referred as kernel components, that are maintained exclusively in the “supervisor mode”
A consistent application program interface (API) allows an application program for one computing device to run on another computing device of the same type, notwithstanding that the amount of memory or the quantity of storage is different on the two devices. Even if a particular computing device is unique, the operating system can ensure that application programs continue to run when hardware upgrades and updates occur, because the operating system and not the application program is responsible for managing the hardware and the distribution of its resources.
To further the efficient use of the device resources, certain functions and modules which may be common to a number of application programs may be stored in the form of a library so that these functions and modules are only stored once and not replicated in each of the application programs with which they are to be used. The contents of the library are therefore selectively linked to the application programs when they are loaded or run rather than being compiled within the individual application programs themselves. It follows that the same block of library code representing a function or module can be shared between several tasks to run on the device rather than each task containing copies of the routines it uses.
These libraries link dynamically with the application programs as the programs are run and therefore the libraries are commonly known as dynamic link libraries (DLLs). Hence, most modern computer operating systems provide a dynamic link library facility that enables certain executable procedures and functions to be provided in the form of a library that is separate from the application programs that execute on the computing device. Typically, an application program is dynamically linked to the library at run-time, so that the application program can call one or more of the procedures and functions that are exported by the library. Exported procedures are commonly referred to as entry points into the library.
Unlike regular application programs, which are generally executed from the beginning, a DLL can be entered at any entry point. There are two main ways of identifying these entry points into a DLL. The first option is to refer to the entry points by name. The second option is to refer to the entry points by ordinal number. This latter option is frequently referred to as function ordinal mapping or function ordinal linking. Names are potentially long in comparison to ordinals and require additional code for their definition. Therefore, the use of names is generally considered to be wasteful of the Read Only Memory (ROM) and Random Access Memory (RAM) resources of the computing device in comparison to the use of ordinal numbers. Ordinal linking of the access points is therefore the preference in certain operating systems, and particularly in those operating systems for use in smart phones because these types of computing devices have very restricted physical resources in comparison to those available in desktop or portable PC devices, and therefore the efficient use of code is of paramount importance.
DLLs provide, therefore, a way by which application programs can be provided in modular format so that functionality can be updated and reused more easily. They also help reduce memory overhead when several applications use the same functionality at the same time, because although each application is provided with a copy of the data, they can share the code. Furthermore, the dynamic linking allows a module to include only the information needed to locate an exported DLL function at load time or run time.
There is an increasing requirement for operating systems to provide a combination of compatibility with customisability. This is particularly the case with smart phone operating systems, such as the Symbian OS™ operating system supplied by Symbian Limited of London, England. Typically, such an operating system is supplied to handset manufacturers, who subsequently provide additional device functionality for operation under the control of the operating system. This means that an operating system of this type must maintain Binary Compatibility in its APIs, whilst at the same time allowing derived platforms and products to add innovative and differentiating functionality to these APIs in order to customise the operating system to the requirements of the respective handset manufacturers.
However, there are difficulties associated with coordinating the DLL entry points as an operating system of this type evolves from one release to the next.
In a first aspect, the present invention seeks to provide a method of providing a dynamic link library in a computing device in which these problems are substantially alleviated.
Accordingly, there is provided a method of providing a dynamic link library for providing functions for use by an executable program in a computing device, the method comprising providing the dynamic link library as a first part having first locations from which one or more first functions may be accessed for use by the executable program, and an extension part for enabling the executable program to access one or more further functions additional to the one or more first functions and located in the first part at locations additional to the first locations.
In a second aspect of the present invention there is provided a computing device operating according to the method of the first aspect.
According to a third aspect of the present invention there is provided computer software arranged to cause a computing device to operate in accordance with the first aspect.